package cn.jltx.utils;

import android.app.Activity;
import android.view.View;


/**
 * @author jltxseo
 * @date 2017/03/28.
 * @description:
 */

public class ViewHelper {

    public static <T extends View> T findViewById(View view,int id){
        if(view == null)return null;
        View childView = view.findViewById(id);
        return (T)childView;
    }

    public static <T extends View> T findViewById(Activity activity, int id){
        if(activity == null)return null;
        View childView = activity.findViewById(id);
        return (T)childView;
    }

}
